package com.kygeng.springframework.beans.factory.config;

import com.kygeng.springframework.beans.factory.HierarchicalBeanFactory;
import com.kygeng.springframework.util.StringValueResolver;

/**
 * @Title: ConfigurableBeanFactory
 * @Author: kygeng
 * @Package: com.kygeng.springframework.beans.factory.config
 * @Date: 2024/7/22 9:42
 * @Description: 用于配置和管理 Bean工厂的属性
 */
public interface ConfigurableBeanFactory extends HierarchicalBeanFactory, SingletonBeanRegistry{

    String SCOPE_SINGLETON = "singleton";

    String SCOPE_PROTOTYPE = "prototype";

    void addBeanPostProcessor(BeanPostProcessor beanPostProcessor);

    /**
     * 销毁单例对象
     */
    void destroySingletons();

    /**
     * 添加字符串解析器
     */
    void addEmbeddedValueResolver(StringValueResolver valueResolver);

    /**
     *
     */
    String resolveEmbeddedValue(String value);
}
